package com.yf.model.ai.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yf.model.ai.enums.AiModelEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * AI 会话配置-AiConfig
 *
 * @author: YiFei
 * @since : 2025年7月6日 23:10:23
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "AI 会话配置")
@TableName("ai_config")
public class AiConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 751647748100L;
    /**
     * 主键
     */
    @Schema(description = "主键")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 会话
     */
    @Schema(description = "会话")
    private Long conversationId;

    /**
     * 模型名称 (e.g., "deepseek-reasoner")
     */
    @Schema(description = "模型名称 (e.g., 'deepseek-reasoner')")
    private AiModelEnum model;

    /**
     * 温度
     */
    @Schema(description = "温度")
    private Double temperature;

    /**
     * 是否为默认
     */
    @Schema(description = "是否为默认")
    private Boolean isDefault;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
